package itxinhaimijijia.hierarchicaldecoupling.dao.Impl;

import cn.hutool.core.io.IoUtil;
import itxinhaimijijia.hierarchicaldecoupling.dao.UserDao;

import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;

public class UserDaoImpl implements UserDao {

    @Override
    public List<String> lindeAll() {
//        return List.of();
        InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream("user.txt");
        ArrayList<String> lines = IoUtil.readLines(resourceAsStream, StandardCharsets.UTF_8, new ArrayList<>());

        return lines;

    }


}
